package com.example.justbuy.service.Impl;

import com.example.justbuy.mapper.UserDao;
import com.example.justbuy.pojo.User;
import com.example.justbuy.service.UserDaoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
@Service
public class UserDaoServiceImpl implements UserDaoService {


    @Autowired
    private UserDao userDao;

    @Override
    public List<User> getAll() {
        return userDao.getAll();
    }

    @Override
    public int insertUser(HashMap map) {
        return userDao.insertUser(map);
    }

    @Override
    public List<User> getByPhone(String phone) {
        return userDao.getByPhone(phone);
    }

    @Override
    public User validateUser(HashMap map) {
        return userDao.validateUser(map);
    }

    @Override
    public User validateUser1(HashMap map) {
        return userDao.validateUser1(map);
    }

    @Override
    public int uadateUser(HashMap map) {
        return userDao.uadateUser(map);
    }

    @Override
    public User getTheInfoUser(int id) {
        return userDao.getTheInfoUser(id);
    }
}
